When redlink=1 is specified, and the page exists, redirect to the "view" page.
authorAndrew Garrett <werdna@users.mediawiki.org>
Thu, 5 Mar 2009 01:57:18 +0000 (01:57 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Thu, 5 Mar 2009 01:57:18 +0000 (01:57 +0000)
includes/EditPage.php

index 5f2ce38..2a64bb1 100644 (file)
@@ -403,6 +403,11 @@ class EditPage {
                                }
                        }
                }
+               
+               // If they used redlink=1 and the page exists, redirect to the main article
+               if ( $wgRequest->getBool( 'redlink' ) && $this->mTitle->exists() ) {
+                       $wgOut->redirect( $this->mTitle->getFullURL() );
+               }
 
                wfProfileIn( __METHOD__."-business-end" );